#ifndef SOLARRADIOMETERPROTOCOL_H
#define SOLARRADIOMETERPROTOCOL_H

#include <QObject>
#include <QDateTime>

namespace  protocol
{
    //太阳辐射计传回的不同数据包长度
    #define RADIO_NSUPROTOCOL_LEN 310
    #define RADIO_STAPROTOCOL_LEN 100 //这个不定长？
    #define RADIO_AODPROTOCOL_LEN 89
    #define RADIO_ATRPROTOCOL_LEN 83
    #define RADIO_SETDTPROTOCOL_LEN 26
    #define RADIO_DATEPROTOCOL_LEN 15
    #define RADIO_TIMEPROTOCOL_LEN 13
    #define RADIO_LATPROTOCOL_LEN 9
    #define RADIO_LONPROTOCOL_LEN 11
    #define RADIO_ALTIPROTOCOL_LEN 10
    #define RADIO_AZPROTOCOL_LEN 9
    #define RADIO_EIPROTOCOL_LEN 8
    #define RADIO_RAINPROTOCOL_LEN 6


    //STA协议对应结构体
    class RadioMeterSTAProtocolAll{
public:
    QDateTime dateTime;
    QString radioMeterStatus;
    double temperature;
    double humidity;
    double voltage;
    QString errCode;
    double heightAngle;
    double azimuthAngle;
    QString turnTableStatus;
    QString powerStatus;

};

    //NSU协议对应结构体
    class RadioMeterNSUProtocolAll{
public:
    QDateTime dateTime;
    double sun1020;
    double sun1640I;
    double sun870;
    double sun675;
    double sun440;
    double sun500;
    double sun1020I;
    double sun937;
    double sun380;
    double sun340;
    double headTemperature;
    double ambientTemperature;
    double airPressure;


};

    //AOD协议对应结构体
    class RadioMeterAODProtocolAll{
public:
    QDateTime dateTime;
    double sun1020;
    double sun1640I;
    double sun870;
    double sun675;
    double sun440;
    double sun500;
    double sun1020I;
    double sun937;
    double sun380;
    double sun340;
    double PWV;
};


    //AOD协议对应结构体
    class RadioMeterATRProtocolAll{
    public:
        QDateTime dateTime;
        double sun1020;
        double sun1640I;
        double sun870;
        double sun675;
        double sun440;
        double sun500;
        double sun1020I;
        double sun937;
        double sun380;
        double sun340;
    };


    class SolarRadiometerProtocol : public QObject
    {
    public:
        RadioMeterSTAProtocolAll m_RadioMeterSTAProtocolAll;
        RadioMeterNSUProtocolAll m_RadioMeterNSUProtocolAll;
        RadioMeterAODProtocolAll m_RadioMeterAODProtocolAll;
    };
}

#endif // SOLARRADIOMETERPROTOCOL_H
